The present invention relates to an encoded data playback method and apparatus for reproducing video and audio data recorded in a recording medium such as an optical disc or a magnetic disc.
The MPEG (Moving Picture Expert Group) standard is a technique for compressing/encoding a digital video signal to be recorded in a recording medium, such as a digital video disc (DVD).
The prediction structure of video picture frames compressed according to the MPEG standard is shown in FIG. 10A. A Group of Pictures (GOP) typically is comprised of 15 frames. The typical GOP includes an I picture, four P pictures and ten B pictures. A GOP is an encoding unit used to divide a sequence of moving pictures.
An I picture is a picture resulting from an intraframe encoding process. A P picture is a predictively encoded picture resulting from an interframe forward-direction predictive encoding process referencing a frame of an I picture or a P picture previously encoded. A B picture is a predictively encoded picture resulting from an interframe bi-direction predictive encoding process referencing an I or P frame preceding and an I or P frame succeeding the B picture.
The referencing of frames in the predictive encoding process is indicated by arrows in FIG. 10A. I picture I.sub.0 is encoded by referencing the contents of the frame itself in an intraframe encoding process. P picture P.sub.0 is predictively encoded by referencing the I picture I.sub.0. B pictures B.sub.0 and B.sub.1 are predictively encoded by referencing I picture I.sub.0 and P picture P.sub.0. B pictures B.sub.2 and B.sub.3 are predictively encoded by referencing P pictures P.sub.0 and P.sub.1. Subsequent pictures are created through the same predictive encoding process.
In the decoding process, an I picture is decoded from data of the I picture itself. A P picture is decoded using data from the previous I or P picture depending on the picture type used to encode the P picture. Similarly, a B picture is decoded using data from the preceding and succeeding I and/or P pictures depending upon the picture types used to encode the B picture.
To enable a smooth decoding process, the pictures are rearranged prior to decoding as shown in FIG. 10B so that those pictures that are required to decode a P or B picture have been previously decoded. I picture I.sub.0 is required to decode B pictures B.sub.-1 and B.sub.-2 ; therefore, the pictures are rearranged so that I picture I.sub.0 precedes B pictures B.sub.-1 and B.sub.-2 as shown in FIG. 10B, even though the original temporal sequence of B pictures B.sub.-1 and B.sub.-2 had preceded I picture I.sub.0. I picture I.sub.0 and P picture P.sub.0 are required to decode B pictures B.sub.0 and B.sub.1, so P picture P.sub.0 is rearranged to precede B pictures B.sub.0 and B.sub.1. P pictures P.sub.0 and P.sub.1 are required to decode B pictures B.sub.2 and B.sub.3, so P picture P.sub.1 is rearranged to precede B pictures B.sub.2 and B.sub.3. P pictures P.sub.1 and P.sub.2 are required to decode B pictures B.sub.4 and B.sub.5, so P picture P.sub.2 is rearranged to precede B pictures B.sub.4 and B.sub.5. P pictures P.sub.2 and P.sub.3 are required to decode B pictures B.sub.6 and B.sub.7, so P picture P.sub.3 is rearranged to precede B pictures B.sub.6 and B.sub.7.
The rearranged I, P and B pictures, shown in FIG. 10B, are recorded in a DVD. Since these pictures are compressed and encoded according to the MPEG standard, the size of the resulting code is not fixed and varies from picture to picture. More specifically, the size of the code differs depending upon the complexity and the flatness of the picture. The code of the picture is recorded in sectors of a DVD, each sector accommodating a fixed amount of code.
The codes are recorded in these sectors as shown in FIG. 11. The code of I picture I.sub.0 is recorded in sector m, sector (m+1) and a portion of sector (m+2). The code of B picture B.sub.-2 is recorded in the remaining portion of sector (m+2) and in sector (m+3). Thus, the code of each picture is recorded successively in sectors of a DVD by dividing the encoded data. In this example, the code of a GOP is recorded in sectors m to (m+21).
The code of a GOP is not normally recorded in a fixed number of sectors. Since the size of the code differs depending upon the complexity and the flatness of the picture, the number of sectors required to record the code of a GOP is generally different for each GOP.
A configuration of a data playback apparatus for reproducing data from a DVD which was compressed and encoded according to the MPEG standard is shown in FIGS. 9A and 9B.
In FIG. 9A, an optical disc 1 is controlled to rotate at a predetermined rotational speed by a spindle motor (not shown). A laser light generated by a pickup 2 is applied to a track of the optical disc to read out digital data recorded on a track of the DVD. The reproduced digital data is EFM-demodulated by a demodulation circuit 3 and then supplied to a sector detecting circuit 4. The output of the pickup is also supplied to a phase locked loop (PLL) circuit 9 to reproduce a clock signal. The reproduced clock signal is supplied from the PLL circuit to the demodulation circuit and the sector detecting circuit.
The digital data was recorded on the optical disc in sector units which have a fixed length, as shown in FIG. 11. A sector synchronization code and a sector header are added, during recording, at the head of each sector. The sector detecting circuit detects a sector delimiter from the sector synchronization code and simultaneously detects information such as a sector address from the sector header. The detected information is supplied to a control circuit 6.
A signal output by demodulation circuit 3 is supplied to an Error Checking and Correction (ECC) circuit 33 through sector detecting circuit 4 to detect and correct errors. The error corrected data is supplied from the ECC circuit to a ring buffer 135 whereat the data is written to a location in the ring buffer under control of the control circuit.
The focus control and the track control of pickup 2 are carried out by a focus servo circuit (not shown) and a tracking servo circuit 8 as a function of focus and tracking error signals obtained from information read out by the pickup.
Control circuit 6 specifies a write address in ring buffer 135 via write pointer WP, to which data read from optical disc 1 is to be written, according to a sector address of the sectors detected by sector detecting circuit 4. In addition, the control circuit specifies a read address via read pointer RP, from which data is read out of the ring buffer, in response to a code request signal received from a video code buffer 10, shown in FIG. 9B. The data located in the address specified by read pointer RP is read out and stored in the video code buffer.
The data stored in the video code buffer is supplied to an inverse variable length coding (VLC) circuit 11 in response to a code request signal received from the inverse VLC circuit. The inverse VLC circuit carries out inverse VLC processing on the data, which is then supplied to an inverse quantizing circuit 12. At this time, another code request signal requesting new data is sent from the inverse VLC circuit to the video code buffer to continue the decoding process.
The inverse VLC circuit also outputs a quantizing step size to the inverse quantizing circuit and motion vector information to a motion compensating circuit 15. Data input to the inverse quantizing circuit had been quantized according to the quantizing step size and the inverse quantized data is supplied to an inverse discrete cosine transform (DCT) circuit 13. The data, which had been DCT processed before recording on optical disc 1, undergoes inverse DCT processing in the inverse DCT circuit and is supplied to an addition circuit 14.
The addition circuit adds the signal output by the inverse DCT circuit to the signal output by the motion compensating circuit. The signal output from the motion compensating circuit depends on the type of signal being decoded, i.e., either an I, P or B picture. The signal output from the addition circuit is supplied to a frame memory bank 16. The frame memory bank is composed of three frame memories 16a, 16b, 16c and two switches, one upstream of the frame memories 16d and one downstream of the frame memories 16e.
Data is then read from the frame memory bank so that the data is arranged in the original frame order, as shown in FIG. 10A. The data read from the frame memory bank is converted by a digital-to-analog (D/A) converter 17 into an analog video signal which is displayed on a display unit 18.
An example of playing back the recorded frames shown in FIG. 10B is discussed below When the I picture is decoded, the signal output by inverse DCT circuit 13 is transmitted to frame memory bank 16 as it is since the I picture did not undergo interframe predictive encoding. When a P or B picture is decoded, previously decoded I and/or P pictures referenced during the interframe predictive encoding of the P or B picture are transmitted from the frame memory bank to motion compensating circuit 15 to create a predicted motion picture according to the motion vector information supplied from inverse VLC circuit 11. The predicted motion picture is then supplied to addition circuit 14. The addition circuit adds the signal output by the motion compensating circuit to the signal output by the inverse DCT circuit. The output of the addition circuit is stored in the frame memory bank, as described above.
As discussed above, control circuit 6 supplies data stored in ring buffer 135 to video code buffer 10 in response to a code request signal received from the video code buffer. When the amount of data transferred from the video code buffer to the inverse VLC circuit decreases while the data processing of simple pictures is taking place, the amount of data transferred from the ring buffer to the video code buffer also decreases. Therefore, the amount of data stored in the ring buffer will increase and could cause write pointer WP to move ahead of read pointer RP. In such a state, an overflow occurs in the ring buffer.
To avoid an overflow state, the amount of data currently stored in the ring buffer is computed from the address positions of write pointer WP and read pointer RP which are controlled by the control circuit. When the amount of data exceeds a preset reference value, a track jump judging circuit 7 determines that an overflow may occur in the ring buffer. At this time, the track jump judging circuit outputs a track jump instruction to a tracking servo circuit 8.
The rate of transferring data from ring buffer 135 to video code buffer 10 is set at a value equal to or smaller than the rate of transferring data from ECC circuit 33 to the ring buffer. This rate limitation allows a request to transfer data from the video code buffer to the ring buffer to be transmitted regardless of the timing of a track jump.
In the data playback apparatus shown in FIGS. 9A and 9B, pickup 2 is controlled to perform track jumps according to the storage capacity of the ring buffer. As a result, an overflow or an underflow can be prevented from occurring in the ring buffer regardless of the complexity or flatness of pictures recorded on optical disc 1, thereby allowing continuous playback of pictures with a uniform quality.
In a reverse playback operation starting from, for example, P picture P.sub.3, it is necessary to display pictures decoded in the following order: P.sub.3, B.sub.7, B.sub.6, P.sub.2, B.sub.5, B.sub.4, P.sub.1, B.sub.3, B.sub.2, P.sub.0, B.sub.1, B.sub.0, I.sub.0 . . . However, since P pictures have undergone interframe predictive encoding, the decoding of P picture P.sub.3 requires the previous decoding of pictures I.sub.0, P.sub.0, P.sub.1 and P.sub.2 Furthermore, to decode B picture B.sub.7, P pictures P.sub.2 and P.sub.3 must have been previously decoded. As a result, in order to carry out a reverse playback operation by decoding each picture only once, a frame memory bank which can store as many frames as there are pictures in a GOP is required.
To carry out a reverse playback operation, the frame memory bank 16 must be expanded to increase its storage capacity. This permits the frame memory bank to sequentially accumulate decoded data and transmit pictures in a reverse playback order.
In addition, it is also possible to reproduce only I and P pictures, in reverse, by skipping the B pictures. However, such reproduction still requires the storage of a large number of frames. Therefore, to decode video data, in reverse, which has been compressed using temporal picture correlation, that is, picture correlation in the time axis direction, such as the MPEG compression technique, two or three additional portions of frame memory are required for the reverse playback operation. This additional memory increases the size and cost of the circuit. Additionally, the amount of power consumed and heat dissipated increases, which makes it necessary to increase the size and capacity of the heat radiating means.